\hypertarget{classCSignalToolkit}{
\section{\-C\-Signal\-Toolkit \-Class \-Reference}
\label{classCSignalToolkit}\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}}
}


\-Analyzes samples for patterns.  




{\ttfamily \#include $<$signal\-\_\-toolkit.\-h$>$}

\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classCSignalToolkit_a9b5cb91343082a7ab26d93801a021243}{\-C\-Signal\-Toolkit} ()
\item 
\hyperlink{classCSignalToolkit_af7f36c3cc4b4c3bad5098747559f29a3}{\-C\-Signal\-Toolkit} (unsigned int p\-Sample\-Rate)
\item 
virtual \hyperlink{classCSignalToolkit_a298a828f37708882c4f3aced46c02b72}{$\sim$\-C\-Signal\-Toolkit} ()
\item 
float \hyperlink{classCSignalToolkit_a42ca598d164252b097ed2d8259c33df3}{find\-Frequency\-Pattern} (double $\ast$p\-Samples, unsigned int p\-Sample\-Count, unsigned int $\ast$p\-Frequencies, unsigned int p\-Frequency\-Count)
\item 
float \hyperlink{classCSignalToolkit_a5e245ba58198a17aa66d22f71b883142}{find\-Frequency\-Pattern} (double $\ast$p\-Samples, unsigned int p\-Sample\-Count, unsigned int $\ast$p\-Frequencies, unsigned int p\-Frequency\-Count, double p\-Max\-Amplitude)
\item 
unsigned int \hyperlink{classCSignalToolkit_a3259a53edab0ddd018ccd4e3e00d358f}{find\-Frequency\-Pattern\-Position} (double $\ast$p\-Samples, unsigned int p\-Sample\-Count, unsigned int $\ast$p\-Frequencies, unsigned int p\-Frequency\-Count, unsigned int p\-Frequency\-Pattern\-Length)
\item 
double \hyperlink{classCSignalToolkit_abdb1bd54e2b04eb8cdab8eb5c881c384}{cross\-Correlation\-Best\-Match} (double $\ast$p\-Samples, unsigned int p\-Sample\-Count, double $\ast$p\-Pattern, unsigned int p\-Pattern\-Count, double p\-Threshold)
\item 
double \hyperlink{classCSignalToolkit_acbc9f5f38988043e3ecf2a60044b0df3}{cross\-Correlation\-Exact} (double $\ast$p\-X, double $\ast$p\-Y, unsigned int p\-Count)
\item 
void \hyperlink{classCSignalToolkit_a0b7e5415cbb680bd1167345e5aed1d38}{set\-Sample\-Rate} (unsigned int p\-Sample\-Rate)
\item 
double \hyperlink{classCSignalToolkit_a56aec51b6100349af6cd4837c341c3ab}{get\-Amplitude\-Of\-Complex} (double $\ast$p\-Complex)
\item 
double \hyperlink{classCSignalToolkit_aaf38e8adabdf07759b329b3181140323}{get\-Phase\-Of\-Complex} (double $\ast$p\-Complex)
\item 
void \hyperlink{classCSignalToolkit_ae92bdd57c7b2028b745012e87acd2109}{generate\-Signal} (double $\ast$p\-Samples, unsigned int p\-Count, unsigned int $\ast$p\-Sync\-Freq, unsigned int p\-Sync\-Freq\-Count)
\item 
void \hyperlink{classCSignalToolkit_a96c5eae6c07122b5515bd1f4562e4b93}{normalize\-Signal} (fftw\-\_\-complex $\ast$p\-Fft\-Sync\-Signal\-Data\-Time\-Domain, unsigned int p\-Length)
\end{DoxyCompactItemize}
\subsection*{\-Private \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
double \hyperlink{classCSignalToolkit_adfe7b0002b3cf8ed3f4ebe8f38e2407d}{find\-Frequency\-Pattern\-Position\-Recursive} (double $\ast$p\-Samples, unsigned int p\-Sample\-Count, unsigned int $\ast$p\-Frequencies, unsigned int p\-Frequency\-Count, unsigned int p\-Frequency\-Pattern\-Length)
\end{DoxyCompactItemize}
\subsection*{\-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
unsigned int \hyperlink{classCSignalToolkit_ae2e9a1c482340a4b186932f4f9139ed8}{m\-Sample\-Rate}
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}
\-Analyzes samples for patterns. 

\begin{DoxyAuthor}{\-Author}
bschildendorfer 
\end{DoxyAuthor}


\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classCSignalToolkit_a9b5cb91343082a7ab26d93801a021243}{
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}}
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!CSignalToolkit@{\-C\-Signal\-Toolkit}}
\subsubsection[{\-C\-Signal\-Toolkit}]{\setlength{\rightskip}{0pt plus 5cm}\-C\-Signal\-Toolkit\-::\-C\-Signal\-Toolkit (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classCSignalToolkit_a9b5cb91343082a7ab26d93801a021243}
\hypertarget{classCSignalToolkit_af7f36c3cc4b4c3bad5098747559f29a3}{
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}}
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!CSignalToolkit@{\-C\-Signal\-Toolkit}}
\subsubsection[{\-C\-Signal\-Toolkit}]{\setlength{\rightskip}{0pt plus 5cm}\-C\-Signal\-Toolkit\-::\-C\-Signal\-Toolkit (
\begin{DoxyParamCaption}
\item[{unsigned int}]{p\-Sample\-Rate}
\end{DoxyParamCaption}
)}}
\label{classCSignalToolkit_af7f36c3cc4b4c3bad5098747559f29a3}
\hypertarget{classCSignalToolkit_a298a828f37708882c4f3aced46c02b72}{
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!$\sim$\-C\-Signal\-Toolkit@{$\sim$\-C\-Signal\-Toolkit}}
\index{$\sim$\-C\-Signal\-Toolkit@{$\sim$\-C\-Signal\-Toolkit}!CSignalToolkit@{\-C\-Signal\-Toolkit}}
\subsubsection[{$\sim$\-C\-Signal\-Toolkit}]{\setlength{\rightskip}{0pt plus 5cm}\-C\-Signal\-Toolkit\-::$\sim$\-C\-Signal\-Toolkit (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classCSignalToolkit_a298a828f37708882c4f3aced46c02b72}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classCSignalToolkit_abdb1bd54e2b04eb8cdab8eb5c881c384}{
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!cross\-Correlation\-Best\-Match@{cross\-Correlation\-Best\-Match}}
\index{cross\-Correlation\-Best\-Match@{cross\-Correlation\-Best\-Match}!CSignalToolkit@{\-C\-Signal\-Toolkit}}
\subsubsection[{cross\-Correlation\-Best\-Match}]{\setlength{\rightskip}{0pt plus 5cm}double \-C\-Signal\-Toolkit\-::cross\-Correlation\-Best\-Match (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Sample\-Count, }
\item[{double $\ast$}]{p\-Pattern, }
\item[{unsigned int}]{p\-Pattern\-Count, }
\item[{double}]{p\-Threshold}
\end{DoxyParamCaption}
)}}
\label{classCSignalToolkit_abdb1bd54e2b04eb8cdab8eb5c881c384}
\-Looks in the samples of $\ast$p\-Samples if the signal p\-Pattern with a \-Threshold of p\-Threshold is in it \hypertarget{classCSignalToolkit_acbc9f5f38988043e3ecf2a60044b0df3}{
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!cross\-Correlation\-Exact@{cross\-Correlation\-Exact}}
\index{cross\-Correlation\-Exact@{cross\-Correlation\-Exact}!CSignalToolkit@{\-C\-Signal\-Toolkit}}
\subsubsection[{cross\-Correlation\-Exact}]{\setlength{\rightskip}{0pt plus 5cm}double \-C\-Signal\-Toolkit\-::cross\-Correlation\-Exact (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{p\-X, }
\item[{double $\ast$}]{p\-Y, }
\item[{unsigned int}]{p\-Count}
\end{DoxyParamCaption}
)}}
\label{classCSignalToolkit_acbc9f5f38988043e3ecf2a60044b0df3}
\hypertarget{classCSignalToolkit_a42ca598d164252b097ed2d8259c33df3}{
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!find\-Frequency\-Pattern@{find\-Frequency\-Pattern}}
\index{find\-Frequency\-Pattern@{find\-Frequency\-Pattern}!CSignalToolkit@{\-C\-Signal\-Toolkit}}
\subsubsection[{find\-Frequency\-Pattern}]{\setlength{\rightskip}{0pt plus 5cm}float \-C\-Signal\-Toolkit\-::find\-Frequency\-Pattern (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Sample\-Count, }
\item[{unsigned int $\ast$}]{p\-Frequencies, }
\item[{unsigned int}]{p\-Frequency\-Count}
\end{DoxyParamCaption}
)}}
\label{classCSignalToolkit_a42ca598d164252b097ed2d8259c33df3}
\-Analyze for frequency peaks


\begin{DoxyParams}{\-Parameters}
{\em p\-Samples} & list of audio samples \\
\hline
{\em p\-Sample\-Count} & length of p\-Samples \\
\hline
{\em p\-Frequency\-Samples} & list of frequencies which should be detected \\
\hline
{\em p\-Frequency} & length of p\-Frequency\-Samples\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
$>$=0 for position of the pattern in p\-Samples call, $<$0 for an error 
\end{DoxyReturn}
\hypertarget{classCSignalToolkit_a5e245ba58198a17aa66d22f71b883142}{
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!find\-Frequency\-Pattern@{find\-Frequency\-Pattern}}
\index{find\-Frequency\-Pattern@{find\-Frequency\-Pattern}!CSignalToolkit@{\-C\-Signal\-Toolkit}}
\subsubsection[{find\-Frequency\-Pattern}]{\setlength{\rightskip}{0pt plus 5cm}float \-C\-Signal\-Toolkit\-::find\-Frequency\-Pattern (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Sample\-Count, }
\item[{unsigned int $\ast$}]{p\-Frequencies, }
\item[{unsigned int}]{p\-Frequency\-Count, }
\item[{double}]{p\-Max\-Amplitude}
\end{DoxyParamCaption}
)}}
\label{classCSignalToolkit_a5e245ba58198a17aa66d22f71b883142}
\-Analyze for frequency peaks


\begin{DoxyParams}{\-Parameters}
{\em p\-Samples} & list of audio samples \\
\hline
{\em p\-Sample\-Count} & length of p\-Samples \\
\hline
{\em p\-Frequency\-Samples} & list of frequencies which should be detected \\
\hline
{\em p\-Frequency} & length of p\-Frequency\-Samples\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
$>$=0 for position of the pattern in p\-Samples call, $<$0 for an error 
\end{DoxyReturn}
\hypertarget{classCSignalToolkit_a3259a53edab0ddd018ccd4e3e00d358f}{
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!find\-Frequency\-Pattern\-Position@{find\-Frequency\-Pattern\-Position}}
\index{find\-Frequency\-Pattern\-Position@{find\-Frequency\-Pattern\-Position}!CSignalToolkit@{\-C\-Signal\-Toolkit}}
\subsubsection[{find\-Frequency\-Pattern\-Position}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int \-C\-Signal\-Toolkit\-::find\-Frequency\-Pattern\-Position (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Sample\-Count, }
\item[{unsigned int $\ast$}]{p\-Frequencies, }
\item[{unsigned int}]{p\-Frequency\-Count, }
\item[{unsigned int}]{p\-Frequency\-Pattern\-Length}
\end{DoxyParamCaption}
)}}
\label{classCSignalToolkit_a3259a53edab0ddd018ccd4e3e00d358f}
\hypertarget{classCSignalToolkit_adfe7b0002b3cf8ed3f4ebe8f38e2407d}{
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!find\-Frequency\-Pattern\-Position\-Recursive@{find\-Frequency\-Pattern\-Position\-Recursive}}
\index{find\-Frequency\-Pattern\-Position\-Recursive@{find\-Frequency\-Pattern\-Position\-Recursive}!CSignalToolkit@{\-C\-Signal\-Toolkit}}
\subsubsection[{find\-Frequency\-Pattern\-Position\-Recursive}]{\setlength{\rightskip}{0pt plus 5cm}double \-C\-Signal\-Toolkit\-::find\-Frequency\-Pattern\-Position\-Recursive (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Sample\-Count, }
\item[{unsigned int $\ast$}]{p\-Frequencies, }
\item[{unsigned int}]{p\-Frequency\-Count, }
\item[{unsigned int}]{p\-Frequency\-Pattern\-Length}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCSignalToolkit_adfe7b0002b3cf8ed3f4ebe8f38e2407d}
\hypertarget{classCSignalToolkit_ae92bdd57c7b2028b745012e87acd2109}{
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!generate\-Signal@{generate\-Signal}}
\index{generate\-Signal@{generate\-Signal}!CSignalToolkit@{\-C\-Signal\-Toolkit}}
\subsubsection[{generate\-Signal}]{\setlength{\rightskip}{0pt plus 5cm}void \-C\-Signal\-Toolkit\-::generate\-Signal (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Count, }
\item[{unsigned int $\ast$}]{p\-Sync\-Freq, }
\item[{unsigned int}]{p\-Sync\-Freq\-Count}
\end{DoxyParamCaption}
)}}
\label{classCSignalToolkit_ae92bdd57c7b2028b745012e87acd2109}
\hypertarget{classCSignalToolkit_a56aec51b6100349af6cd4837c341c3ab}{
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!get\-Amplitude\-Of\-Complex@{get\-Amplitude\-Of\-Complex}}
\index{get\-Amplitude\-Of\-Complex@{get\-Amplitude\-Of\-Complex}!CSignalToolkit@{\-C\-Signal\-Toolkit}}
\subsubsection[{get\-Amplitude\-Of\-Complex}]{\setlength{\rightskip}{0pt plus 5cm}double \-C\-Signal\-Toolkit\-::get\-Amplitude\-Of\-Complex (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{p\-Complex}
\end{DoxyParamCaption}
)}}
\label{classCSignalToolkit_a56aec51b6100349af6cd4837c341c3ab}
\hypertarget{classCSignalToolkit_aaf38e8adabdf07759b329b3181140323}{
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!get\-Phase\-Of\-Complex@{get\-Phase\-Of\-Complex}}
\index{get\-Phase\-Of\-Complex@{get\-Phase\-Of\-Complex}!CSignalToolkit@{\-C\-Signal\-Toolkit}}
\subsubsection[{get\-Phase\-Of\-Complex}]{\setlength{\rightskip}{0pt plus 5cm}double \-C\-Signal\-Toolkit\-::get\-Phase\-Of\-Complex (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{p\-Complex}
\end{DoxyParamCaption}
)}}
\label{classCSignalToolkit_aaf38e8adabdf07759b329b3181140323}
\hypertarget{classCSignalToolkit_a96c5eae6c07122b5515bd1f4562e4b93}{
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!normalize\-Signal@{normalize\-Signal}}
\index{normalize\-Signal@{normalize\-Signal}!CSignalToolkit@{\-C\-Signal\-Toolkit}}
\subsubsection[{normalize\-Signal}]{\setlength{\rightskip}{0pt plus 5cm}void \-C\-Signal\-Toolkit\-::normalize\-Signal (
\begin{DoxyParamCaption}
\item[{fftw\-\_\-complex $\ast$}]{p\-Fft\-Sync\-Signal\-Data\-Time\-Domain, }
\item[{unsigned int}]{p\-Length}
\end{DoxyParamCaption}
)}}
\label{classCSignalToolkit_a96c5eae6c07122b5515bd1f4562e4b93}
\hypertarget{classCSignalToolkit_a0b7e5415cbb680bd1167345e5aed1d38}{
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!set\-Sample\-Rate@{set\-Sample\-Rate}}
\index{set\-Sample\-Rate@{set\-Sample\-Rate}!CSignalToolkit@{\-C\-Signal\-Toolkit}}
\subsubsection[{set\-Sample\-Rate}]{\setlength{\rightskip}{0pt plus 5cm}void \-C\-Signal\-Toolkit\-::set\-Sample\-Rate (
\begin{DoxyParamCaption}
\item[{unsigned int}]{p\-Sample\-Rate}
\end{DoxyParamCaption}
)}}
\label{classCSignalToolkit_a0b7e5415cbb680bd1167345e5aed1d38}


\subsection{\-Member \-Data \-Documentation}
\hypertarget{classCSignalToolkit_ae2e9a1c482340a4b186932f4f9139ed8}{
\index{\-C\-Signal\-Toolkit@{\-C\-Signal\-Toolkit}!m\-Sample\-Rate@{m\-Sample\-Rate}}
\index{m\-Sample\-Rate@{m\-Sample\-Rate}!CSignalToolkit@{\-C\-Signal\-Toolkit}}
\subsubsection[{m\-Sample\-Rate}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int {\bf \-C\-Signal\-Toolkit\-::m\-Sample\-Rate}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCSignalToolkit_ae2e9a1c482340a4b186932f4f9139ed8}


\-The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\hyperlink{signal__toolkit_8h}{signal\-\_\-toolkit.\-h}\item 
\hyperlink{signal__toolkit_8cxx}{signal\-\_\-toolkit.\-cxx}\end{DoxyCompactItemize}
